package org.tony.xml.demo;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;

public class SaxDemoTest
{

	/**
	 * @param args
	 * @throws SAXException
	 * @throws IOException
	 * @throws FileNotFoundException
	 */
	public static void main(String[] args) throws SAXException , FileNotFoundException , IOException
	{
		MyContentHandler m = new MyContentHandler();
		XMLReader reader = XMLReaderFactory.createXMLReader();
		reader.setContentHandler(m);
		reader.parse(new InputSource(new FileInputStream("src/main/java/org/tony/xml/demo/demo.xml")));
	}
}
